package com.lishem.rpc.client.runner;

import com.lishem.common.data.RpcResponse;

import java.util.concurrent.Future;

/**
 * 继承自Future接口，自定义Future，对Future的增强
 */
public interface RequestFuture<T> extends Future<T> {

    Throwable cause();

    void setCause(Throwable cause);

    boolean isWriteSuccess();

    void setWriteResult(boolean result);

    String requestId();

    T response();

    void setResponse(RpcResponse response);

    boolean isTimeout();
}